<!--
 * @Description: 
 * @Author: charles
 * @Date: 2021-05-05 22:02:56
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2021-09-29 16:00:02
-->
<template>
  <div id="id" style="height: 95%"></div>
</template>
<script>
import { Radar } from "@antv/g2plot";

export default {
  data() {
    return {
      l2_data: [
        { name: "G2", star: 10371 },
        { name: "G6", star: 7380 },
        { name: "F2", star: 7414 },
        { name: "L7", star: 2140 },
        { name: "X6", star: 660 },
        { name: "AVA", star: 885 },
        { name: "G2Plot", star: 1626 },
      ],
    };
  },
  methods: {
    getdata() {
      const radarPlot = new Radar('id', {
  data: this.l2_data,
  xField: 'name',
  yField: 'star',
  meta: {
    star: {
      min: 0,
      nice: true,
    },
  },
  area: {},
});
radarPlot.render();
    },
  },
  mounted() {
    this.getdata();
  },
};
</script>